package com.waiting.spi;

import java.util.ServiceLoader;

/**
 * @Description 测试SPi功能
 * @Author bjweitingting
 * @Date 2019/1/16
 **/
public class Main {
    public static void main(String[] args) {
        ServiceLoader<SpiService> serviceLoader=ServiceLoader.load(SpiService.class);
        for (SpiService tmp:serviceLoader){
            System.out.println(tmp.testSpi());
        }
        System.out.println("done");
    }
}
